package com.k.kpp.web.controller;

import com.k.kc.util.ClassUtils;
import com.k.kc.util.DateUtils;
import com.k.kpp.model.UserReq;
import com.k.kpp.model.entity.User;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.*;

/**
 * @author k
 */
public class Test {
    private int number;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
    public static void test(int number){
    }
    public void testP(){
        List<Person> list = new ArrayList<>();
        Person p1 = new Person(1,"t1");
        Person p2 = new Person(2,"t2");
        Person p3 = new Person(3,"t3");
        list.add(p1);
        list.add(p2);
        list.add(p3);
        boolean df = list.remove(p1);
        System.out.println("df:"+df);
        System.out.println(list);
    }

    public static void main(String[] args) {
        // 执行会 关联 kpp-common的编译
        // 1.makePackage 2.installPackage  3.uninstallPackage 4.start 5.stop
    }

    /**
     * private class
     */
    private class PersonPri{
        int id;
        String name;

        public PersonPri(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * default class
     */
     class Person{
        int id;
        String name;

        public Person(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void test(){
            getNumber();
        }

        @Override
        public String toString() {
            return "Person{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    '}';
        }
    }

    /**
     * protected class
     */
    protected class PersonPro{
        int id;
        String name;

        public PersonPro(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * public inner class
     */
    public class PersonPub{
        int id;
        String name;

        public PersonPub(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
